import request from '../utils/requestTest';

export function get(url, params) {
			url += '.manage';
      if (params) {
        let paramsArray = [];
        //拼接参数
        Object.keys(params).forEach(key => paramsArray.push(key + '=' + params[key]));
        if (url.search(/\?/) === -1) {
          url += '?' + paramsArray.join('&');
        } else {
          url += '&' + paramsArray.join('&');
        }
        url+='&token='+sessionStorage.getItem('token');
      }else{
      	url+='?token='+sessionStorage.getItem('token');
      }
  //	debugger;
    return request(url,{
      method:'get'
    });
}
